package com.mxpio.erp.common.quality.entity;

import com.mxpioframework.jpa.annotation.Generator;
import com.mxpioframework.security.annotation.Dict;
import com.mxpioframework.security.entity.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data;
import lombok.EqualsAndHashCode;

import javax.persistence.*;

@Data
@EqualsAndHashCode(callSuper=false)
@Entity
@Table(name = "MB_ERP_QUALITY_IS_LINE")
@Schema(description="质检方案行")//质检方案行
public class InspectionSchemeLine extends BaseEntity{
	private static final long serialVersionUID = 1L;

	@Id
	@Generator
	@Column(name = "ID_", updatable = false)
	@Schema(description = "ID")
	private String id;

	@Column(name = "SCHEME_CODE_", updatable = false)
	@Schema(description = "方案编号")
	private String schemeCode;

	@Column(name = "LINE_ORDER_")
	@Schema(description = "检验顺序")
	private Integer lineOrder;

	@Column(name = "CODE_")
	@Schema(description = "检测项目编号")
	private String code;

	//@Column(name = "NAME_")
	@Transient
	@Schema(description = "检测项目名称")
	private String name;

	@Column(name = "BPMN_STATUS_")
	@Schema(description = "审核状态")
	@Dict(dicCode = "ERP_COMMON_BPMN_STATUS")
	private String bpmnStatus;

	//@Column(name = "ITEM_CLASS_")
	@Transient
	@Schema(description = "检测项目分类")
	@Dict(dicCode = "ERP_QUAL_II_CLASS")
	private String itemClass;

	//@Column(name = "ITEM_TYPE_")
	@Transient
	@Schema(description = "检测项目类型")
	@Dict(dicCode = "ERP_QUAL_II_TYPE")
	private String itemType;

	//@Column(name = "DEFECT_GRADE_")
	@Transient
	@Schema(description = "检测项目缺陷等级")
	@Dict(dicCode = "ERP_QUAL_II_DEFECT_GRADE")
	private String defectGrade;

	//@Column(name = "STANDARD_")
	@Transient
	@Schema(description = "检验标准")
	private String standard;

	//@Column(name = "DETECTION_TOOL_")
	@Transient
	@Schema(description = "检测工具")
	private String detectionTool;

	//@Column(name = "DETECTION_METHOD_")
	@Transient
	@Schema(description = "检测方法")
	private String detectionMethod;

	//@Column(name = "TECHNICAL_REQUIREMENTS_")
	@Transient
	@Schema(description = "技术要求")
	private String technicalRequirements;

	@Column(name = "COMPARATOR_")
	@Schema(description = "比较符")
	private String comparator;//

	@Column(name = "TARGET_VALUE_")
	@Schema(description = "目标值")
	private String targetValue;//目标值

	@Column(name = "UNITS_")
	@Schema(description = "单位")
	private String units;//单位

	@Column(name = "MAX_VALUE_")
	@Schema(description = "最大值")
	private String maxValue;//

	@Column(name = "MIN_VALUE__")
	@Schema(description = "最小值")
	private String minValue;//

	@Column(name = "MEMO_")
	@Schema(description = "备注")
	private String memo;
	@Transient
	private InspectionItem inspectionItem;
}
